package com.chaofan.websocket.Model;

import com.chaofan.websocket.Web.MyWebSocket;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Objects;

/**
 * Created by Chaofan at 2018/7/6 10:08
 * email:chaofan2685@qq.com
 **/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class User {

    public String id;
    public String nickname;
    public MyWebSocket webSocket;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        User user = (User) o;
        return id.equals(user.getId());
    }
}
